library(metafor)
library(forestplot)

metadata<-rbind(rbind(rbind(rbind(rbind(metadata1,metadata2),metadata3),metadata4),metadata5),metadata6)



lnor<- log(metadata[,"HR"])

lnuci<- log(metadata[,"up95"])

lnlci<- log(metadata[,"low95"])

selnor<- (lnuci-lnlci)/(2*1.96)


library(meta)

mg0 <- meta::metagen(lnor,lower=lnlci, upper=lnuci,data = metadata, sm="HR",studlab = paste(rownames(metadata))) #meta分析
summary(mg0) #输出结果



forest(mg0, common = T,layout = "RevMan5", label.right = "Risk effect", 
       label.left = "Protect effect",lower.equi = 0.75, upper.equi = 1 / 0.75,fill.lower.equi = c("#3CB37180", "lightgray"),
       fill.upper.equi = c("lightgray", "#DC143C80") )

funnel(mg0,studlab = T,common = F,col = "blue",bg = "darkgray",lwd = 1.5, cex = 1.5, pch = 16)


library(grDevices)

color <-c( "#DC143C","#3CB371")
alpha <- 0.5

new_color <- adjustcolor(color, alpha)

# 输出修改后的颜色
print(new_color)
